﻿namespace Smart.Utils.UI.BarcodeLib
{
    using System;
    using System.Data;
    using System.Drawing;
    using System.Drawing.Drawing2D;
    using System.Drawing.Imaging;
    using System.IO;
    using System.Runtime.CompilerServices;

    public class BarcodeEdit : IDisposable
    {
        private Color _BackColor;
        private string _Country_Assigning_Manufacturer_Code;
        private Image _Encoded_Image;
        private double _EncodingTime;
        private System.Drawing.Font _font;
        private Color _ForeColor;
        private int _Height;
        private System.Drawing.Imaging.ImageFormat _ImageFormat;
        private BarCodeStyles _styles;
        private System.Drawing.Font _textFont;
        private int _Width;
        private string _XML;
        [CompilerGenerated]
        private bool _ShowText_k__BackingField;
        [CompilerGenerated]
        private bool _ShowTitle_k__BackingField;
        [CompilerGenerated]
        private string _Text_k__BackingField;
        [CompilerGenerated]
        private string _Title_k__BackingField;
        private string Encoded_Value;
        private string Formatted_Data;

        public BarcodeEdit()
        {
            this.Formatted_Data = "";
            this.Encoded_Value = "";
            this._Country_Assigning_Manufacturer_Code = "N/A";
            this._styles = BarCodeStyles.UNSPECIFIED;
            this._Encoded_Image = null;
            this._ForeColor = Color.Black;
            this._BackColor = Color.White;
            this._Width = 300;
            this._Height = 150;
            this._EncodingTime = 0.0;
            this._XML = "";
            this._ImageFormat = System.Drawing.Imaging.ImageFormat.Jpeg;
            this._textFont = new System.Drawing.Font("Tahoma", 8f, FontStyle.Regular);
            this._font = new System.Drawing.Font("Tahoma", 8f, FontStyle.Regular);
            this.Text = "";
            this.Title = "";
        }

        public BarcodeEdit(string data)
        {
            this.Formatted_Data = "";
            this.Encoded_Value = "";
            this._Country_Assigning_Manufacturer_Code = "N/A";
            this._styles = BarCodeStyles.UNSPECIFIED;
            this._Encoded_Image = null;
            this._ForeColor = Color.Black;
            this._BackColor = Color.White;
            this._Width = 300;
            this._Height = 150;
            this._EncodingTime = 0.0;
            this._XML = "";
            this._ImageFormat = System.Drawing.Imaging.ImageFormat.Jpeg;
            this._textFont = new System.Drawing.Font("Tahoma", 8f, FontStyle.Regular);
            this._font = new System.Drawing.Font("Tahoma", 8f, FontStyle.Regular);
            this.Title = "";
            this.Text = data;
        }

        public BarcodeEdit(string data, BarCodeStyles iBarCodeStyles)
        {
            this.Formatted_Data = "";
            this.Encoded_Value = "";
            this._Country_Assigning_Manufacturer_Code = "N/A";
            this._styles = BarCodeStyles.UNSPECIFIED;
            this._Encoded_Image = null;
            this._ForeColor = Color.Black;
            this._BackColor = Color.White;
            this._Width = 300;
            this._Height = 150;
            this._EncodingTime = 0.0;
            this._XML = "";
            this._ImageFormat = System.Drawing.Imaging.ImageFormat.Jpeg;
            this._textFont = new System.Drawing.Font("Tahoma", 8f, FontStyle.Regular);
            this._font = new System.Drawing.Font("Tahoma", 8f, FontStyle.Regular);
            this.Title = "";
            this.Text = data;
            this._styles = iBarCodeStyles;
        }

        internal static bool CheckNumericOnly(string Data)
        {
            int length = 0x12;
            string str = Data;
            string[] strArray = new string[(Data.Length / length) + (((Data.Length % length) == 0) ? 0 : 1)];
            int num2 = 0;
            while (num2 < strArray.Length)
            {
                if (str.Length >= length)
                {
                    strArray[num2++] = str.Substring(0, length);
                    str = str.Substring(length);
                }
                else
                {
                    strArray[num2++] = str.Substring(0);
                }
            }
            foreach (string str2 in strArray)
            {
                long result = 0L;
                if (!long.TryParse(str2, out result))
                {
                    return false;
                }
            }
            return true;
        }

        public void Dispose()
        {
            try
            {
            }
            catch (Exception exception)
            {
                throw new Exception("EDISPOSE-1: " + exception.Message);
            }
        }

        public static Image DoEncode(BarCodeStyles iBarCodeStyles, string Data)
        {
            using (BarcodeEdit edit = new BarcodeEdit())
            {
                return edit.Encode(iBarCodeStyles, Data);
            }
        }

        public static Image DoEncode(BarCodeStyles iBarCodeStyles, string Data, bool IncludeLabel)
        {
            using (BarcodeEdit edit = new BarcodeEdit())
            {
                edit.ShowText = IncludeLabel;
                return edit.Encode(iBarCodeStyles, Data);
            }
        }

        public static Image DoEncode(BarCodeStyles iBarCodeStyles, string Data, ref string XML)
        {
            using (BarcodeEdit edit = new BarcodeEdit())
            {
                Image image = edit.Encode(iBarCodeStyles, Data);
                XML = edit.XML;
                return image;
            }
        }

        public static Image DoEncode(BarCodeStyles iBarCodeStyles, string Data, bool IncludeLabel, Color DrawColor, Color BackColor)
        {
            using (BarcodeEdit edit = new BarcodeEdit())
            {
                edit.ShowText = IncludeLabel;
                return edit.Encode(iBarCodeStyles, Data, DrawColor, BackColor);
            }
        }

        public static Image DoEncode(BarCodeStyles iBarCodeStyles, string Data, bool IncludeLabel, int Width, int Height)
        {
            using (BarcodeEdit edit = new BarcodeEdit())
            {
                edit.ShowText = IncludeLabel;
                return edit.Encode(iBarCodeStyles, Data, Width, Height);
            }
        }

        public static Image DoEncode(BarCodeStyles iBarCodeStyles, string Data, bool IncludeLabel, Color DrawColor, Color BackColor, int Width, int Height)
        {
            using (BarcodeEdit edit = new BarcodeEdit())
            {
                edit.ShowText = IncludeLabel;
                return edit.Encode(iBarCodeStyles, Data, DrawColor, BackColor, Width, Height);
            }
        }

        public static Image DoEncode(BarCodeStyles iBarCodeStyles, string Data, bool IncludeLabel, Color DrawColor, Color BackColor, int Width, int Height, ref string XML)
        {
            using (BarcodeEdit edit = new BarcodeEdit())
            {
                edit.ShowText = IncludeLabel;
                Image image = edit.Encode(iBarCodeStyles, Data, DrawColor, BackColor, Width, Height);
                XML = edit.XML;
                return image;
            }
        }

        internal Image Encode()
        {
            IBarcode barcode;
            DateTime now = DateTime.Now;
            if (this.Text.Trim() == "")
            {
                throw new Exception("EENCODE-1: Input data not allowed to be blank.");
            }
            if (this.Styles == BarCodeStyles.UNSPECIFIED)
            {
                throw new Exception("EENCODE-2: Symbology type not allowed to be unspecified.");
            }
            this.Encoded_Value = "";
            this._Country_Assigning_Manufacturer_Code = "N/A";
            switch (this._styles)
            {
                case BarCodeStyles.UPCA:
                case BarCodeStyles.UCC12:
                    barcode = new UPCA(this.Text);
                    break;

                case BarCodeStyles.UPCE:
                    barcode = new UPCE(this.Text);
                    break;

                case BarCodeStyles.UPC_SUPPLEMENTAL_2DIGIT:
                    barcode = new UPCSupplement2(this.Text);
                    break;

                case BarCodeStyles.UPC_SUPPLEMENTAL_5DIGIT:
                    barcode = new UPCSupplement5(this.Text);
                    break;

                case BarCodeStyles.EAN13:
                case BarCodeStyles.UCC13:
                    barcode = new EAN13(this.Text);
                    break;

                case BarCodeStyles.EAN8:
                    barcode = new EAN8(this.Text);
                    break;

                case BarCodeStyles.Interleaved2of5:
                    barcode = new Interleaved2of5(this.Text);
                    break;

                case BarCodeStyles.Standard2of5:
                case BarCodeStyles.Industrial2of5:
                    barcode = new Standard2of5(this.Text);
                    break;

                case BarCodeStyles.CODE39:
                case BarCodeStyles.LOGMARS:
                    barcode = new Code39(this.Text);
                    break;

                case BarCodeStyles.CODE39Extended:
                    barcode = new Code39(this.Text, true);
                    break;

                case BarCodeStyles.Codabar:
                    barcode = new Codabar(this.Text);
                    break;

                case BarCodeStyles.PostNet:
                    barcode = new Postnet(this.Text);
                    break;

                case BarCodeStyles.BOOKLAND:
                case BarCodeStyles.ISBN:
                    barcode = new ISBN(this.Text);
                    break;

                case BarCodeStyles.JAN13:
                    barcode = new JAN13(this.Text);
                    break;

                case BarCodeStyles.MSI_Mod10:
                case BarCodeStyles.MSI_2Mod10:
                case BarCodeStyles.MSI_Mod11:
                case BarCodeStyles.MSI_Mod11_Mod10:
                case BarCodeStyles.Modified_Plessey:
                    barcode = new MSI(this.Text, this._styles);
                    break;

                case BarCodeStyles.CODE11:
                case BarCodeStyles.USD8:
                    barcode = new Code11(this.Text);
                    break;

                case BarCodeStyles.CODE128:
                    barcode = new Code128(this.Text);
                    break;

                case BarCodeStyles.CODE128A:
                    barcode = new Code128(this.Text, Code128.TYPES.A);
                    break;

                case BarCodeStyles.CODE128B:
                    barcode = new Code128(this.Text, Code128.TYPES.B);
                    break;

                case BarCodeStyles.CODE128C:
                    barcode = new Code128(this.Text, Code128.TYPES.C);
                    break;

                case BarCodeStyles.ITF14:
                    barcode = new ITF14(this.Text);
                    break;

                case BarCodeStyles.CODE93:
                    barcode = new Code93(this.Text);
                    break;

                default:
                    throw new Exception("EENCODE-2: Unsupported encoding type specified.");
            }
            this.Encoded_Value = barcode.Encoded_Value;
            this.Text = barcode.RawData;
            this.Formatted_Data = barcode.FormattedData;
            TimeSpan span = (TimeSpan) (DateTime.Now - now);
            this._EncodingTime = span.TotalMilliseconds;
            this._Encoded_Image = this.Generate_Image();
            this._XML = this.GetXML();
            return this.EncodedImage;
        }

        internal Image Encode(BarCodeStyles iBarCodeStyles)
        {
            this._styles = iBarCodeStyles;
            return this.Encode();
        }

        public Image Encode(BarCodeStyles iBarCodeStyles, string stringToEncode)
        {
            this.Text = stringToEncode;
            return this.Encode(iBarCodeStyles);
        }

        public Image Encode(BarCodeStyles iBarCodeStyles, string StringToEncode, Color ForeColor, Color BackColor)
        {
            this.BackColor = BackColor;
            this.ForeColor = ForeColor;
            return this.Encode(iBarCodeStyles, StringToEncode);
        }

        public Image Encode(BarCodeStyles iBarCodeStyles, string StringToEncode, int Width, int Height)
        {
            this.Width = Width;
            this.Height = Height;
            return this.Encode(iBarCodeStyles, StringToEncode);
        }

        public Image Encode(BarCodeStyles iBarCodeStyles, string StringToEncode, Color ForeColor, Color BackColor, int Width, int Height)
        {
            this.Width = Width;
            this.Height = Height;
            return this.Encode(iBarCodeStyles, StringToEncode, ForeColor, BackColor);
        }

        private Bitmap Generate_Image()
        {
            if (this.Encoded_Value == "")
            {
                throw new Exception("EGENERATE_IMAGE-1: Must be encoded first.");
            }
            Bitmap image = null;
            BarCodeStyles styles = this._styles;
            if (styles != BarCodeStyles.PostNet)
            {
                int num3;
                int num4;
                int num5;
                Graphics graphics;
                Pen pen;
                if (styles != BarCodeStyles.ITF14)
                {
                    image = new Bitmap(this.Width, this.Height);
                    num3 = this.Width / this.Encoded_Value.Length;
                    num4 = (this.Width % this.Encoded_Value.Length) / 2;
                    if (num3 <= 0)
                    {
                        throw new Exception("EGENERATE_IMAGE-2: Image size specified not large enough to draw image. (Bar size determined to be less than 1 pixel)");
                    }
                    num5 = 0;
                    using (graphics = Graphics.FromImage(image))
                    {
                        graphics.Clear(this.BackColor);
                        pen = new Pen(this.ForeColor, (float) num3);
                        pen.Alignment = PenAlignment.Right;
                        while (num5 < this.Encoded_Value.Length)
                        {
                            if (this.Encoded_Value[num5] == '1')
                            {
                                graphics.DrawLine(pen, new Point((num5 * num3) + num4, 0), new Point((num5 * num3) + num4, this.Height));
                            }
                            num5++;
                        }
                    }
                    if (this.ShowText)
                    {
                        this.Label_Generic(image);
                    }
                }
                else
                {
                    image = new Bitmap(this.Width, this.Height);
                    int num = (int) (((double) image.Width) / 12.05);
                    int num2 = Convert.ToInt32((double) (image.Width * 0.05));
                    num3 = ((image.Width - (num * 2)) - (num2 * 2)) / this.Encoded_Value.Length;
                    num4 = (((image.Width - (num * 2)) - (num2 * 2)) % this.Encoded_Value.Length) / 2;
                    if ((num3 <= 0) || (num2 <= 0))
                    {
                        throw new Exception("EGENERATE_IMAGE-3: Image size specified not large enough to draw image. (Bar size determined to be less than 1 pixel or quiet zone determined to be less than 1 pixel)");
                    }
                    num5 = 0;
                    using (graphics = Graphics.FromImage(image))
                    {
                        graphics.Clear(this.BackColor);
                        pen = new Pen(this.ForeColor, (float) num3);
                        pen.Alignment = PenAlignment.Right;
                        while (num5 < this.Encoded_Value.Length)
                        {
                            if (this.Encoded_Value[num5] == '1')
                            {
                                graphics.DrawLine(pen, new Point((((num5 * num3) + num4) + num) + num2, 0), new Point((((num5 * num3) + num4) + num) + num2, this.Height));
                            }
                            num5++;
                        }
                        pen = new Pen(this.ForeColor, ((float) image.Height) / 8f);
                        pen.Alignment = PenAlignment.Inset;
                        graphics.DrawLine(pen, new Point(0, 0), new Point(image.Width, 0));
                        graphics.DrawLine(pen, new Point(0, image.Height), new Point(image.Width, image.Height));
                        graphics.DrawLine(pen, new Point(0, 0), new Point(0, image.Height));
                        graphics.DrawLine(pen, new Point(image.Width, 0), new Point(image.Width, image.Height));
                    }
                    if (this.ShowText)
                    {
                        this.Label_ITF14(image);
                    }
                }
            }
            else
            {
                image = new Bitmap(this.Encoded_Value.Length * 4, 20);
                for (int i = image.Height - 1; i > 0; i--)
                {
                    int x = 0;
                    if (i >= (image.Height / 2))
                    {
                        goto Label_03C0;
                    }
                    while (x < image.Width)
                    {
                        if (this.Encoded_Value[x / 4] == '1')
                        {
                            image.SetPixel(x, i, this.ForeColor);
                            image.SetPixel(x + 1, i, this.ForeColor);
                            image.SetPixel(x + 2, i, this.BackColor);
                            image.SetPixel(x + 3, i, this.BackColor);
                        }
                        else
                        {
                            image.SetPixel(x, i, this.BackColor);
                            image.SetPixel(x + 1, i, this.BackColor);
                            image.SetPixel(x + 2, i, this.BackColor);
                            image.SetPixel(x + 3, i, this.BackColor);
                        }
                        x += 4;
                    }
                    goto Label_03D1;
                Label_036E:
                    image.SetPixel(x, i, this.ForeColor);
                    image.SetPixel(x + 1, i, this.ForeColor);
                    image.SetPixel(x + 2, i, this.BackColor);
                    image.SetPixel(x + 3, i, this.BackColor);
                    x += 4;
                Label_03C0:
                    if (x < image.Width)
                    {
                        goto Label_036E;
                    }
                Label_03D1:;
                }
            }
            this._Encoded_Image = image;
            return image;
        }

        public byte[] GetImageData(SaveTypes savetype)
        {
            byte[] buffer = null;
            try
            {
                if (this._Encoded_Image == null)
                {
                    return buffer;
                }
                using (MemoryStream stream = new MemoryStream())
                {
                    this.SaveImage(stream, savetype);
                    buffer = stream.ToArray();
                    stream.Flush();
                    stream.Close();
                }
            }
            catch (Exception exception)
            {
                throw new Exception("EGETIMAGEDATA-1: Could not retrieve image data. " + exception.Message);
            }
            return buffer;
        }

        public static Image GetImageFromXML(BarcodeXML internalXML)
        {
            Image image;
            try
            {
                byte[] buffer = new byte[internalXML.Barcode[0].Image.Length];
                using (MemoryStream stream = new MemoryStream(Convert.FromBase64String(internalXML.Barcode[0].Image)))
                {
                    image = Image.FromStream(stream);
                }
            }
            catch (Exception exception)
            {
                throw new Exception("EGETIMAGEFROMXML-1: " + exception.Message);
            }
            return image;
        }

        private string GetXML()
        {
            string str;
            if (this.EncodedValue == "")
            {
                throw new Exception("EGETXML-1: Could not retrieve XML due to the barcode not being encoded first.  Please call Encode first.");
            }
            try
            {
                using (BarcodeXML exml = new BarcodeXML())
                {
                    BarcodeXML.BarcodeRow row = exml.Barcode.NewBarcodeRow();
                    row.Type = this.Styles.ToString();
                    row.Text = this.Text;
                    row.EncodedValue = this.EncodedValue;
                    row.EncodingTime = this.EncodingTime;
                    row.ShowText = this.ShowText;
                    row.Forecolor = ColorTranslator.ToHtml(this.ForeColor);
                    row.Backcolor = ColorTranslator.ToHtml(this.BackColor);
                    row.CountryAssigningManufacturingCode = this.CAM_Code;
                    row.ImageWidth = this.Width;
                    row.ImageHeight = this.Height;
                    using (MemoryStream stream = new MemoryStream())
                    {
                        this.EncodedImage.Save(stream, this.ImageFormat);
                        row.Image = Convert.ToBase64String(stream.ToArray(), Base64FormattingOptions.None);
                    }
                    exml.Barcode.AddBarcodeRow(row);
                    StringWriter writer = new StringWriter();
                    exml.WriteXml(writer, XmlWriteMode.WriteSchema);
                    str = writer.ToString();
                }
            }
            catch (Exception exception)
            {
                throw new Exception("EGETXML-2: " + exception.Message);
            }
            return str;
        }

        private Image Label_Generic(Image img)
        {
            Image image;
            try
            {
                System.Drawing.Font font = this._textFont;
                using (Graphics graphics = Graphics.FromImage(img))
                {
                    graphics.DrawImage(img, (float) 0f, (float) 0f);
                    graphics.SmoothingMode = SmoothingMode.HighQuality;
                    graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
                    graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;
                    graphics.CompositingQuality = CompositingQuality.HighQuality;
                    graphics.FillRectangle(new SolidBrush(this.BackColor), new Rectangle(0, img.Height - 0x10, img.Width, 0x10));
                    StringFormat format = new StringFormat();
                    format.Alignment = StringAlignment.Center;
                    string s = (this.FormattedData.Trim() != "") ? this.FormattedData : this.Text;
                    graphics.DrawString(s, font, new SolidBrush(this.ForeColor), (float) (img.Width / 2), (float) (img.Height - 0x10), format);
                    graphics.Save();
                }
                image = img;
            }
            catch (Exception exception)
            {
                throw new Exception("ELABEL_GENERIC-1: " + exception.Message);
            }
            return image;
        }

        private Image Label_ITF14(Image img)
        {
            Image image;
            try
            {
                System.Drawing.Font font = this._font;
                using (Graphics graphics = Graphics.FromImage(img))
                {
                    graphics.DrawImage(img, (float) 0f, (float) 0f);
                    graphics.SmoothingMode = SmoothingMode.HighQuality;
                    graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
                    graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;
                    graphics.CompositingQuality = CompositingQuality.HighQuality;
                    graphics.FillRectangle(new SolidBrush(this.BackColor), new Rectangle(0, img.Height - 0x10, img.Width, 0x10));
                    StringFormat format = new StringFormat();
                    format.Alignment = StringAlignment.Center;
                    graphics.DrawString(this.Text, font, new SolidBrush(this.ForeColor), (float) (img.Width / 2), (float) (img.Height - 0x10), format);
                    Pen pen = new Pen(this.ForeColor, ((float) img.Height) / 16f);
                    pen.Alignment = PenAlignment.Inset;
                    graphics.DrawLine(pen, new Point(0, img.Height - 20), new Point(img.Width, img.Height - 20));
                    graphics.Save();
                }
                image = img;
            }
            catch (Exception exception)
            {
                throw new Exception("ELABEL_ITF14-1: " + exception.Message);
            }
            return image;
        }

        public void SaveImage(Stream stream, SaveTypes FileType)
        {
            try
            {
                if (this._Encoded_Image != null)
                {
                    System.Drawing.Imaging.ImageFormat jpeg;
                    switch (FileType)
                    {
                        case SaveTypes.JPG:
                            jpeg = System.Drawing.Imaging.ImageFormat.Jpeg;
                            break;

                        case SaveTypes.BMP:
                            jpeg = System.Drawing.Imaging.ImageFormat.Bmp;
                            break;

                        case SaveTypes.PNG:
                            jpeg = System.Drawing.Imaging.ImageFormat.Png;
                            break;

                        case SaveTypes.GIF:
                            jpeg = System.Drawing.Imaging.ImageFormat.Gif;
                            break;

                        case SaveTypes.TIFF:
                            jpeg = System.Drawing.Imaging.ImageFormat.Tiff;
                            break;

                        default:
                            jpeg = this.ImageFormat;
                            break;
                    }
                    ((Bitmap) this._Encoded_Image).Save(stream, jpeg);
                }
            }
            catch (Exception exception)
            {
                throw new Exception("ESAVEIMAGE-2: Could not save image.\n\n=======================\n\n" + exception.Message);
            }
        }

        public void SaveImage(string Filename, SaveTypes FileType)
        {
            try
            {
                if (this._Encoded_Image != null)
                {
                    System.Drawing.Imaging.ImageFormat jpeg;
                    switch (FileType)
                    {
                        case SaveTypes.JPG:
                            jpeg = System.Drawing.Imaging.ImageFormat.Jpeg;
                            break;

                        case SaveTypes.BMP:
                            jpeg = System.Drawing.Imaging.ImageFormat.Bmp;
                            break;

                        case SaveTypes.PNG:
                            jpeg = System.Drawing.Imaging.ImageFormat.Png;
                            break;

                        case SaveTypes.GIF:
                            jpeg = System.Drawing.Imaging.ImageFormat.Gif;
                            break;

                        case SaveTypes.TIFF:
                            jpeg = System.Drawing.Imaging.ImageFormat.Tiff;
                            break;

                        default:
                            jpeg = this.ImageFormat;
                            break;
                    }
                    ((Bitmap) this._Encoded_Image).Save(Filename, jpeg);
                }
            }
            catch (Exception exception)
            {
                throw new Exception("ESAVEIMAGE-1: Could not save image.\n\n=======================\n\n" + exception.Message);
            }
        }

        public void Update()
        {
            this.Encode();
        }

        public Color BackColor
        {
            get
            {
                return this._BackColor;
            }
            set
            {
                this._BackColor = value;
            }
        }

        public string CAM_Code
        {
            get
            {
                return this._Country_Assigning_Manufacturer_Code;
            }
        }

        public Image EncodedImage
        {
            get
            {
                return this._Encoded_Image;
            }
        }

        public string EncodedValue
        {
            get
            {
                return this.Encoded_Value;
            }
        }

        public double EncodingTime
        {
            get
            {
                return this._EncodingTime;
            }
            set
            {
                this._EncodingTime = value;
            }
        }

        public System.Drawing.Font Font
        {
            get
            {
                return this._font;
            }
            set
            {
                this._font = value;
            }
        }

        public Color ForeColor
        {
            get
            {
                return this._ForeColor;
            }
            set
            {
                this._ForeColor = value;
            }
        }

        public string FormattedData
        {
            get
            {
                return this.Formatted_Data;
            }
        }

        public int Height
        {
            get
            {
                return this._Height;
            }
            set
            {
                this._Height = value;
            }
        }

        public System.Drawing.Imaging.ImageFormat ImageFormat
        {
            get
            {
                return this._ImageFormat;
            }
            set
            {
                this._ImageFormat = value;
            }
        }

        public bool ShowText
        {
            [CompilerGenerated]
            get
            {
                return this._ShowText_k__BackingField;
            }
            [CompilerGenerated]
            set
            {
                this._ShowText_k__BackingField = value;
            }
        }

        public bool ShowTitle
        {
            [CompilerGenerated]
            get
            {
                return this._ShowTitle_k__BackingField;
            }
            [CompilerGenerated]
            set
            {
                this._ShowTitle_k__BackingField = value;
            }
        }

        public BarCodeStyles Styles
        {
            get
            {
                return this._styles;
            }
            set
            {
                this._styles = value;
            }
        }

        public string Text
        {
            [CompilerGenerated]
            get
            {
                return this._Text_k__BackingField;
            }
            [CompilerGenerated]
            set
            {
                this._Text_k__BackingField = value;
            }
        }

        public System.Drawing.Font TextFont
        {
            get
            {
                return this._textFont;
            }
            set
            {
                this._textFont = value;
            }
        }

        public string Title
        {
            [CompilerGenerated]
            get
            {
                return this._Title_k__BackingField;
            }
            [CompilerGenerated]
            set
            {
                this._Title_k__BackingField = value;
            }
        }

        public int Width
        {
            get
            {
                return this._Width;
            }
            set
            {
                this._Width = value;
            }
        }

        public string XML
        {
            get
            {
                return this._XML;
            }
        }
    }
}

